/*
 * SFTPClientListener.h
 *
 *  Created on: Apr 10, 2011
 *      Author: sms103
 */

#ifndef SFTPCLIENTLISTENER_H_
#define SFTPCLIENTLISTENER_H_


class SFTPClientListener;

#include "SFTPClient.h"
#include "LocalConnectionHandler.h"
#include "../networklib/TCPSocket.h"

#define DEFAULT_CLIENT_LISTEN_PORT 50555

class SFTPClientListener {
public:
	SFTPClientListener(SFTPClient *client);
	void  runListener();
	bool isListening();
	void close();

	virtual ~SFTPClientListener();

private:
	//keep a pointer to Client to pass to new sessionhandlers
	SFTPClient *sftpClient;

	int clientListenPort;

	//our listen socket
	TCPSocket *listenSock;
	//sock is open and listening?
	bool listening;


	void setParams();


};



#endif /* SFTPCLIENTLISTENER_H_ */
